x86/crash: Drop manual hooking of exception_table[]
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 7 Oct 2021 13:02:10 +0000 (14:02 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 29 Nov 2021 13:53:05 +0000 (13:53 +0000)
commite7f147bf4ac725492962a501da72f5ab6be682db
tree29cfb50cd959444e81c5c66bfa5019f56258961f
parent04c48ccd75963891e377c5f27dd7411dde1a4286
x86/crash: Drop manual hooking of exception_table[]

NMI hooking in the crash path has undergone several revisions since its
introduction.  What we have now is not sufficiently different from the regular
nmi_callback() mechanism to warrant special casing.

Use set_nmi_callback() directly, and do away with patching a read-only data
structure via a read-write alias.  This also means that the
vmx_vmexit_handler() can and should call do_nmi() directly, rather than
indirecting through the exception table to pick up the crash path hook.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/crash.c
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/traps.c